import logging,yagmail,yaml,json
def log_set():
    logging.basicConfig(filename='log.txt',filemode='w+',level=logging.DEBUG,format='%(asctime)s -> %(le%(message)svelname)s -> ')
def send_mail(filepath):
    mail=yagmail.SMTP(user='3597652057@qq.com',password='ofpkrfpuokvichac',host='smtp.qq.com')
    mail.send(to='3597652057@qq.com',subject='测试报告',contents='今日报告，请查看',attachments=filepath)
getyaml=yaml.safe_load('utf-8') as f:
    logging.info(yaml.safe_load(f))
getjson=json.load('utf-8') as f:
    logging.info(json.load(f))